#pragma once
#include"Channel.h"
#include"Epoll.h"
#include<vector>
#include<functional>
class Epoll;
class Channel;
class EventLoop
{
public:
    using func_t = std::function<void(EventLoop*)>;
private:
    /* data */
    Epoll* epfd_;
    func_t timeCallBack_;
public:
    EventLoop();
    ~EventLoop();
    Epoll* getEpfd();
    std::vector<Channel*> run();
    void updateChannel(Channel *ch);   

    void setTimeCallBack(func_t fn);
    
};



